import request from '@/utils/request'

// 查询企业人员列表
export function listWorker(query) {
  return request({
    url: '/ido/worker/list',
    method: 'get',
    params: query
  })
}

// 查询企业人员详细
export function getWorker(id) {
  return request({
    url: '/ido/worker/' + id,
    method: 'get'
  })
}

// 新增企业人员(勿用)
export function addWorker(data) {
  return request({
    url: '/ido/worker',
    method: 'post',
    data: data
  })
}

// 修改企业人员
export function updateWorker(data) {
  return request({
    url: '/ido/worker',
    method: 'put',
    data: data
  })
}

// 删除企业人员(勿用)
export function delWorker(id) {
  return request({
    url: '/ido/worker/' + id,
    method: 'delete'
  })
}

// 导出企业人员
export function exportWorker(query) {
  return request({
    url: '/ido/worker/export',
    method: 'get',
    params: query
  })
}

// 新版增加企业员工
export function increaseWorker(data) {
  return request({
    url: '/ido/app/back/user/worker',
    method: 'post',
    data: data
  })
}

// 新版删除企业员工
export function decreaseWorker(id) {
  return request({
    url: '/ido/app/back/user/worker/' + id,
    method: 'delete'
  })
}
